package com.ys.entity.account;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TCW_AdvanceAccount", catalog="Id")
public class TcwAdvanceAccount extends BaseEntity<TcwAdvanceAccount> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="Code", nameJava="code", typeDataBase="varchar")
	private String code;
	@YsField(nameDataBase="Name", nameJava="name", typeDataBase="varchar")
	private String name;
	@YsField(nameDataBase="AccountType", nameJava="accountType", typeDataBase="tinyint")
	private Integer accountType;
	@YsField(nameDataBase="UserBankInfoId", nameJava="userBankInfoId", typeDataBase="bigint")
	private Long userBankInfoId;
	@YsField(nameDataBase="PartnerBankInfoId", nameJava="partnerBankInfoId", typeDataBase="bigint")
	private Long partnerBankInfoId;
	@YsField(nameDataBase="AdvanceLimit", nameJava="advanceLimit", typeDataBase="decimal")
	private BigDecimal advanceLimit;
	@YsField(nameDataBase="Orgid", nameJava="orgid", typeDataBase="varchar")
	private String orgid;
	@YsField(nameDataBase="UserId", nameJava="userId", typeDataBase="varchar")
	private String userId;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public TcwAdvanceAccount setId(Long id) {
		this.id = id;
		return this;
	}
	public String getCode() {
		return code;
	}
	public TcwAdvanceAccount setCode(String code) {
		this.code = code;
		return this;
	}
	public String getName() {
		return name;
	}
	public TcwAdvanceAccount setName(String name) {
		this.name = name;
		return this;
	}
	public Integer getAccountType() {
		return accountType;
	}
	public TcwAdvanceAccount setAccountType(Integer accountType) {
		this.accountType = accountType;
		return this;
	}
	public Long getUserBankInfoId() {
		return userBankInfoId;
	}
	public TcwAdvanceAccount setUserBankInfoId(Long userBankInfoId) {
		this.userBankInfoId = userBankInfoId;
		return this;
	}
	public Long getPartnerBankInfoId() {
		return partnerBankInfoId;
	}
	public TcwAdvanceAccount setPartnerBankInfoId(Long partnerBankInfoId) {
		this.partnerBankInfoId = partnerBankInfoId;
		return this;
	}
	public BigDecimal getAdvanceLimit() {
		return advanceLimit;
	}
	public TcwAdvanceAccount setAdvanceLimit(BigDecimal advanceLimit) {
		this.advanceLimit = advanceLimit;
		return this;
	}
	public String getOrgid() {
		return orgid;
	}
	public TcwAdvanceAccount setOrgid(String orgid) {
		this.orgid = orgid;
		return this;
	}
	public String getUserId() {
		return userId;
	}
	public TcwAdvanceAccount setUserId(String userId) {
		this.userId = userId;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TcwAdvanceAccount setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TcwAdvanceAccount setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TcwAdvanceAccount setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TcwAdvanceAccount tcwAdvanceAccount(
		String code,
		String name,
		Integer accountType,
		Long userBankInfoId,
		Long partnerBankInfoId,
		BigDecimal advanceLimit,
		String orgid,
		String userId,
		Integer status
			) {
		TcwAdvanceAccount entity = new TcwAdvanceAccount();
		entity.setCode(code);
		entity.setName(name);
		entity.setAccountType(accountType);
		entity.setUserBankInfoId(userBankInfoId);
		entity.setPartnerBankInfoId(partnerBankInfoId);
		entity.setAdvanceLimit(advanceLimit);
		entity.setOrgid(orgid);
		entity.setUserId(userId);
		entity.setStatus(status);
		return entity;
	}
}